home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++,comp.protocols.tcp-ip
- Path: in1.uu.net!etnibsd!sandeep
- From: sandeep@etnibsd.uucp (Sandeep Pathak)
- Subject: Re: Socket classes and fork()
- Message-ID: <1996Jan18.172828.2549@etnibsd.uucp>
- Keywords: sockets, C++, fork
- Reply-To: sandeep%etnibsd@uunet.uu.net
- Organization: Eaton Ion Beam Systems Div., Beverly, MA
- References: <1996Jan15.192235.21245@etnibsd.uucp> <dlbzgv.fkn@inka.de>
- Date: Thu, 18 Jan 1996 17:28:28 GMT
-
- In article <dlbzgv.fkn@inka.de> olaf@inka.de (Olaf Titz) writes:
- >Sandeep Pathak <sandeep%etnibsd@uunet.uu.net> wrote:
- >> My Socket class also has a reference count similar to that maintained
- >> by the kernel for a socket descriptor. But how do I maintain this count
- >> if a fork() is done? I can not think of anyway of maintaining
- >> consistency w/ the kernel count unless there is some parent <-> child
- >> IPC for the Socket object. Anybody want to share some experiences?..
- >
- >Encapsulate every fork() you use in a routine that does this housekeeping.
- >
- >olaf
-
- I have seen a Fork wrapper in "sockets++-1.x". I guess I need to look at it
- further..but I am still confused about maintaining consistency amongst objects
- after a fork(), (unless I check for SIGCHLD signal??). Someone suggested
- use of threads so we have the same process space then. I guess thats the way
- to go..but I just cannot invest that much time now.
- Any other ideas besides threads (shared memory..i guess..).
- I will post the responses I got thru email as a collective reply.
-
- thanks for all your input, folks!
-
- -sandeep
- -----------------------------------------------------------------
- Sandeep Pathak ! secs: (508)921-9696
- Eaton Corporation ! mins: (508)927-3652
- Semiconductor Equipment Div. ! hrs : spathak@bev.etn.com
- "Whatever u can do or dream u ! days: 108 Cherry Hill Drive
- can do..begin it" -- Goethe ! Beverly MA 01915
- -----------------------------------------------------------------
-
-